import { defineStore } from "pinia";
import { useRouter } from "vue-router";

export const useCheckGroupState = defineStore("CheckGroupState", {
  state: () => ({
    routerList: [], // 一级菜单
    hasQuanXianList: [], // 有权限操作的菜单
  }),
  getters: {
    routerGetter() {
      const routerList = useRouter()
        .getRoutes()
        .filter((item: any) => {
          return item.meta.header[0] === "header";
        });
      return routerList;
    },
  },
});
